
<%@page language="java" import="org.json.JSONObject"%>
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />
<meta name="robots" content="all,follow" />
<meta name="author" lang="en"
	content="All: ... [www.url.com]; e-mail: info@url.com" />
<meta name="copyright" lang="en"
	content="Webdesign: Nuvio [www.nuvio.cz]; e-mail: ahoj@nuvio.cz" />
<meta name="description" content="..." />
<meta name="keywords" content="..." />
<link rel="stylesheet" media="screen,projection" type="text/css"
	href="css/reset.css" />
<link rel="stylesheet" media="screen,projection" type="text/css"
	href="css/main.css" />
<!--[if lte IE 6]><link rel="stylesheet" media="screen,projection" type="text/css" href="css/main-ie6.css" /><![endif]-->
<link rel="stylesheet" media="screen,projection" type="text/css"
	href="css/style.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.innerfade.js"></script>
<script type="text/javascript" src="/UBCDatingServer/jgrowl/jquery.jgrowl.js"></script>
<link rel="stylesheet" href="css/jquery.jgrowl.css" type="text/css"/>
<script type="text/javascript">
    $(document).ready(
    function(){
        $('#slider').innerfade({
            animationtype: 'fade',
            speed: 750,
            timeout: 3000,
            type: 'sequence',
            containerheight: 'auto'
        });
    });
    </script>
    <script type='text/javascript'
	src='http://code.jquery.com/jquery-1.6.4.js'></script>
<script type="text/javascript"
	src="/UBCDatingServer/jgrowl/jquery.jgrowl.js"></script>
<script type='text/javascript' src='/UBCDatingServer/NotificationUpdates.js'></script>

<title>UBCDating</title>
</head>

<body>
	<%@ page import="Model.User" %>
	<%@ page import="Model.DateProfile.PersonalInfo" %>
	<%@ page import="DBAccess.DBAccess" %>
	<%new DBAccess(); %>
	<div id="main">


<%
JSONObject inp = null;
String name = null;
int userID = -1;
if(session.getAttribute("loggedIn") == Boolean.TRUE){
	if(session.getAttribute("userInfo")!=null)
	{
 		inp=(JSONObject)session.getAttribute("userInfo");
		System.out.println(inp);
	}
 		name = (String) session.getAttribute("name");
 		userID = (Integer) session.getAttribute("userID");
}

%>

		<% if(session.getAttribute("loggedIn") == Boolean.FALSE) { %>
		<p>Invalid password or user name.</p>
		<%
	} %>
		<!-- Header -->

		<div id="header" class="box">

			<p id="logo">
				<a href="index.jsp" title="Your Company [Go to homepage]"><img
					src="design/logo.gif" alt="Logo" />
				</a>
			</p>

			<hr class="noscreen" />

			<!-- Navigation -->
			<p id="nav">
<!-- If we want to bold the current page do like this
	 			<%if (request.getRequestURI().equals("/UBCDatingServer/index.jsp")){ %>
				<strong>Home</strong> <span>|</span> 
				<%}else {%>
				<a href="index.jsp">Home</a><span>|</span>
				<%} %> 
-->
				
				<a href="index.jsp">Home</a><span>|</span>
				<a href="profile.jsp">Profile</a><span>|</span> 
				<a href="inbox.jsp">Inbox</a><span>|</span> 
				<a href="chat.jsp">Chat</a><span>|</span> 
				<a href="matches.jsp">Make	Matches</a><span>|</span>
				<a href="notifications.jsp">Notifications</a> <img id="notIcon"
					src="./images/notification.png" width="12" alt="" />
					
				<% if(session.getAttribute("loggedIn") == Boolean.TRUE){%>
					<span>|</span><a href="logout.jsp">logout</a>
					
				<%} %>
			</p>

			<% if(session.getAttribute("loggedIn") != Boolean.TRUE) { %>
			<div id="log">
				<form action="/UBCDatingServer/login" method="post">
					<p class="nomt">
						<strong>Email:</strong> <input type="text" size="14" class="input"
							name="name" /> <strong>Password:</strong> <input type="password"
							size="14" class="input" name="password" /> <input type="submit"
							class="input-submit-small" value="Sign In" />

					</p>

				</form>
			</div>
			<%} else {%>
			<div id="welcome">
				<p>
					Hello,
					<% if(inp != null){%>
					<%= inp.getString("name")%>
					<%} %>
				</p>
				</div>
				<%} %>
			
		</div>
	<div id='notID' style='display: none'><%=session.getAttribute("userID")%></div>	
		<!-- /header -->
		    <hr class="noscreen" />
		
